const app = getApp();
let conf = require('../../app.config').app
Component({

  options: {
    multipleSlots: true,
  },

  data: {
    // 状态栏高度
    statusBarHeight: app.globalData.statusBarHeight,
    // 弹窗的关闭按钮文字
    closeButtonText: '关闭',
    // 是否隐藏
    isHide: true,
  },

  properties:{
    content: String,
  },

  methods: {
    hide() {
      this.setData({
        isHide: true,
      });
    },
    show(options) {
      if (options.content) {
        this.properties.content = options.content;
      }
      if (options.closeButtonText) {
        this.setData({
          closeButtonText: options.closeButtonText,
        });
      }
      this.setData({
        isHide: false,
      });
      
    },
    onCloseTap(event) {
      this.setData({
        isHide: true,
      });
      this.triggerEvent("onPopupCloseTap");
    }
  },

})